package kms

type CreateKeyReq struct {
	Keyspec string `json:"keyspec"`
	Origin  string `json:"origin"`
}

func (req *CreateKeyReq) action() string {
	return "CreateKey"
}

type CreateKeyRes struct {
	ResCommon
	Result struct {
		Keyid string `json:"keyid"`
	} `json:"result"`
}

func (c *Client) CreateKey() (res CreateKeyRes, err error) {
	req := &CreateKeyReq{
		Keyspec: "EH_SM4_CTR",
		Origin:  "EH_INTERNAL_KEY",
	}
	err = c.Request(req, &res)
	return
}
